package com.yonyou.cyxdms.sysAuth.service.dto.user;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;
import com.yonyou.cyx.framework.bean.entity.base.BasePO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyx.function.utils.jsonserializer.localdatetime.JsonLocalDateTimeDeserializer;
import com.yonyou.cyx.function.utils.jsonserializer.localdatetime.JsonLocalDateTimeSerializer;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author: jeres
 * @since: 2018/10/28
 * @updateDate:
 * @updateRemark:
 * @version:1.0 Copyright: Copyright (c) 2018
 */
public class EmployeeDTO extends BaseDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 姓名
     */
    private String employeeName;
    /**
     * 经销商代码
     */
    private String dealerCode;
    /**
     * 员工编号
     */
    private String employeeNo;
    /**
     * 人员ID
     */
    private Long empId;
    /**
     * 公司ID
     */
    private Long companyId;
    /**
     * 租户ID
     */
    private String appId;

    /**
     * 性别
     */
    private Integer gender;
    /**
     * E_MAIL
     */
    private String eMail;
    /**
     * 邮编
     */
    private String zipCode;
    /**
     * 身份证号
     */
    private String identifyId;
    /**
     * 手机号
     */
    private String mobilePhone;
    private String address;
    /**
     * 婚姻状况
     */
    private Integer marriageStatus;
    /**
     * 照片
     */
    private Integer photos;
    /**
     * 备注
     */
    private String remark;
    /**
     * QQ
     */
    private String qq;
    /**
     * 微信
     */
    private String wechat;
    /**
     * 毕业院校
     */
    private String university;
    /**
     * 籍贯
     */
    private String nativePlace;
    /**
     * 户口
     */
    private String registered;
    /**
     * 培训认证信息
     */
    private String authentication;
    /**
     * 是否有效
     */
    private Integer validStatus;
    @JsonDeserialize(using = JsonLocalDateTimeDeserializer.class)
    @JsonSerialize(using = JsonLocalDateTimeSerializer.class)
    private LocalDateTime sourceChangedAt;

    private UserDTO userDTO;

    /**
     * ID
     */
    private String id;
    /**
     * 登录代码
     */
    private String vLogin;
    /**
     * 是否登录
     */
    private String cLogin;
    /**
     * MD5密码
     */
    private String vPwd;
    /**
     * 手机号
     */
    private String vMobile;
    /**
     * DTMS状态
     */
    private String vDTMSStatus;
    /**
     * 状态
     */
    private int vState;
    /**
     * 冻结备注
     */
    private String vFreezeRemark;
    /**
     * 微信ID
     */
    private String vWXOpenID;
    /**
     * app微信ID
     */
    private String vAppOpenID;

    private String name;
    private String pwd;
    private String newPassword;

    /**
     * app微信昵称
     */
    private String vWXNickName;
    /**
     * 初始化密码标记
     */
    private int cInitPWD;
    /**
     * 初始化密码
     */
    private String vInitPWD;
    private String createBy;
    /**
     * 创建日期
     */

    private LocalDateTime createOn;

    /**
     * 用友手机端使用参数
     */
    private String device;
    private String rEG_ID;

    private String updateBy;
    /**
     * 更新时间戳
     */

    private Long updateOn;
    private int record_version;

    private String flag;
    private String vPwdOld;
    private String cBindState;
    private int nLoginFailNum;
    private String imgCheck;

    /**
     * 头像url
     */
    private String headImgUrl;

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getvLogin() {
        return vLogin;
    }

    public void setvLogin(String vLogin) {
        this.vLogin = vLogin;
    }

    public String getcLogin() {
        return cLogin;
    }

    public void setcLogin(String cLogin) {
        this.cLogin = cLogin;
    }

    public String getvPwd() {
        return vPwd;
    }

    public void setvPwd(String vPwd) {
        this.vPwd = vPwd;
    }

    public String getvMobile() {
        return vMobile;
    }

    public void setvMobile(String vMobile) {
        this.vMobile = vMobile;
    }

    public String getvDTMSStatus() {
        return vDTMSStatus;
    }

    public void setvDTMSStatus(String vDTMSStatus) {
        this.vDTMSStatus = vDTMSStatus;
    }

    public int getvState() {
        return vState;
    }

    public void setvState(int vState) {
        this.vState = vState;
    }

    public String getvFreezeRemark() {
        return vFreezeRemark;
    }

    public void setvFreezeRemark(String vFreezeRemark) {
        this.vFreezeRemark = vFreezeRemark;
    }

    public String getvWXOpenID() {
        return vWXOpenID;
    }

    public void setvWXOpenID(String vWXOpenID) {
        this.vWXOpenID = vWXOpenID;
    }

    public String getvAppOpenID() {
        return vAppOpenID;
    }

    public void setvAppOpenID(String vAppOpenID) {
        this.vAppOpenID = vAppOpenID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getNewPassword() {
        return newPassword;
    }

    public void setNewPassword(String newPassword) {
        this.newPassword = newPassword;
    }

    public String getvWXNickName() {
        return vWXNickName;
    }

    public void setvWXNickName(String vWXNickName) {
        this.vWXNickName = vWXNickName;
    }

    public int getcInitPWD() {
        return cInitPWD;
    }

    public void setcInitPWD(int cInitPWD) {
        this.cInitPWD = cInitPWD;
    }

    public String getvInitPWD() {
        return vInitPWD;
    }

    public void setvInitPWD(String vInitPWD) {
        this.vInitPWD = vInitPWD;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public LocalDateTime getCreateOn() {
        return createOn;
    }

    public void setCreateOn(LocalDateTime createOn) {
        this.createOn = createOn;
    }

    public String getDevice() {
        return device;
    }

    public void setDevice(String device) {
        this.device = device;
    }

    public String getrEG_ID() {
        return rEG_ID;
    }

    public void setrEG_ID(String rEG_ID) {
        this.rEG_ID = rEG_ID;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Long getUpdateOn() {
        return updateOn;
    }

    public void setUpdateOn(Long updateOn) {
        this.updateOn = updateOn;
    }

    public int getRecord_version() {
        return record_version;
    }

    public void setRecord_version(int record_version) {
        this.record_version = record_version;
    }

    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    public String getvPwdOld() {
        return vPwdOld;
    }

    public void setvPwdOld(String vPwdOld) {
        this.vPwdOld = vPwdOld;
    }

    public String getcBindState() {
        return cBindState;
    }

    public void setcBindState(String cBindState) {
        this.cBindState = cBindState;
    }

    public int getnLoginFailNum() {
        return nLoginFailNum;
    }

    public void setnLoginFailNum(int nLoginFailNum) {
        this.nLoginFailNum = nLoginFailNum;
    }

    public String getImgCheck() {
        return imgCheck;
    }

    public void setImgCheck(String imgCheck) {
        this.imgCheck = imgCheck;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getEmpId() {
        return empId;
    }

    public void setEmpId(Long empId) {
        this.empId = empId;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getEmployeeName() {
        return employeeName;
    }

    public void setEmployeeName(String employeeName) {
        this.employeeName = employeeName;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String geteMail() {
        return eMail;
    }

    public void seteMail(String eMail) {
        this.eMail = eMail;
    }

    public String getZipCode() {
        return zipCode;
    }

    public void setZipCode(String zipCode) {
        this.zipCode = zipCode;
    }

    public String getIdentifyId() {
        return identifyId;
    }

    public void setIdentifyId(String identifyId) {
        this.identifyId = identifyId;
    }

    public String getMobilePhone() {
        return mobilePhone;
    }

    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getMarriageStatus() {
        return marriageStatus;
    }

    public void setMarriageStatus(Integer marriageStatus) {
        this.marriageStatus = marriageStatus;
    }

    public Integer getPhotos() {
        return photos;
    }

    public void setPhotos(Integer photos) {
        this.photos = photos;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getWechat() {
        return wechat;
    }

    public void setWechat(String wechat) {
        this.wechat = wechat;
    }

    public String getUniversity() {
        return university;
    }

    public void setUniversity(String university) {
        this.university = university;
    }

    public String getNativePlace() {
        return nativePlace;
    }

    public void setNativePlace(String nativePlace) {
        this.nativePlace = nativePlace;
    }

    public String getRegistered() {
        return registered;
    }

    public void setRegistered(String registered) {
        this.registered = registered;
    }

    public String getAuthentication() {
        return authentication;
    }

    public void setAuthentication(String authentication) {
        this.authentication = authentication;
    }

    public Integer getValidStatus() {
        return validStatus;
    }

    public void setValidStatus(Integer validStatus) {
        this.validStatus = validStatus;
    }

    public LocalDateTime getSourceChangedAt() {
        return sourceChangedAt;
    }

    public void setSourceChangedAt(LocalDateTime sourceChangedAt) {
        this.sourceChangedAt = sourceChangedAt;
    }

    public UserDTO getUserDTO() {
        return userDTO;
    }

    public String getHeadImgUrl() {
        return headImgUrl;
    }

    public void setHeadImgUrl(String headImgUrl) {
        this.headImgUrl = headImgUrl;
    }

    public void setUserDTO(UserDTO userDTO) {
        this.userDTO = userDTO;
    }

    /**
     * 将DTO 转换为PO
     * //对某个对象属性进行赋值
     * //BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param poClass dto 需要转换的dto
     * @author zhangxianchao
     * @since 2018/7/22 0022
     */
    @Override
    public <T extends BasePO> T transDtoToPo(Class<T> poClass) {
        return super.transDtoToPo(poClass);
    }

    /**
     * 将DTO 转换为PO
     * //BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param po 需要转换的对象
     * @author zhangxianchao
     * @since 2018/7/22 0022
     */
    public <T extends BasePO> void transDtoToPo(T po) {
        BeanMapperUtil.copyProperties(this, po, "empId");
    }

    public String getDealerCode() {
        return dealerCode;
    }

    public void setDealerCode(String dealerCode) {
        this.dealerCode = dealerCode;
    }

    public String getEmployeeNo() {
        return employeeNo;
    }

    public void setEmployeeNo(String employeeNo) {
        this.employeeNo = employeeNo;
    }
}
